ODBC Connection Attributes
Table 1-1 lists ODBC connection attributes in alphabetical order. The list includes long and short names and provides a description of each attribute. Short names are shown enclosed within parentheses ( ).
The default values listed in the table are initial defaults that apply when no value is specified in the connection string or in the ODBC data source definition. If you specified a value for the attribute when configuring the ODBC data source, that value is your default.
Table 1-1. ODBC Connection Attributes Attribute Description AlternateServers (ASRV) A list of alternate SequeLink servers to which the driver will try to connect if the primary database server is unavailable. Specifying a value for this connection string attribute enables connection failover for the driver. See "Configuring Connection Failover" for a discussion of connection failover.The value you specify must be in the form of a string that defines the physical location of each alternate server. All of the other required connection information for each alternate server is the same as what is defined for the primary server connection.You must specify the host name and port number of each alternate server. Optionally, you may specify the server data source name. The string has the format:For example, the following AlternateServers value defines three alternate SequeLink servers for connection failover:AlternateServers=(Host=AccountingSLServer: Port=13999,Host=AccountingAltServer:Port= 13998:ServerDataSource=Backup,Host= AccountingAlt2:Port=13997)IMPORTANT: If you specify an LDAP server in the Host attribute, the alternate servers must be LDAP servers. For example, the following AlternateServers value defines three alternate LDAP servers for connection failover: ApplicationID (APPID) Specifies the application ID that identifies the client application to the SequeLink service. This attribute is only required when the SequeLink service you are connecting to has been configured to limit access to specific applications.See "Specifying Application IDs" on page 85 for more information about using application IDs to limit access to the SequeLink services. ApplicationName (APPNAME) Identifies the application that is establishing the connections.The initial default is SequeLink for ODBC Application. AutomaticApplicationID (AUTOAPPID) Specifies an application ID that is automatically generated by the ODBC Client to identify the client application to the SequeLink service. This attribute is only required when the SequeLink service you are connecting to has been configured to limit access to specific applications.See "Specifying Application IDs" on page 85 for more information about using application IDs to limit access to SequeLink services. BlockFetchForUpdate (BFFU) BlockFetchForUpdate={0 | 1}. Specifies a workaround connection attribute. When the isolation level is Read committed and a SELECT FOR UPDATE statement is issued against some data stores, the ODBC Client does not lock the expected row.When set to 0, the appropriate row is locked.When set to 1 (the initial default), the appropriate row is not locked.NOTE: Specifying 0 will degrade the performance for SELECT FOR UPDATE statements because rows will be fetched one at a time. ConnectionRetryCount (CRC) Specifies the number of times the driver tries to connect to the primary server, and if configured, to the alternate servers after the initial unsuccessful attempt.Valid values are integers from 0 to 65535. When set to 0 (the initial default), the driver does not try to connect after the initial unsuccessful attempt.If a connection is not established during the retry attempts, the driver returns an error that is generated by the last server to which it tried to connect.This attribute and the ConnectionRetryDelay connection string attribute, which specifies the wait interval between attempts, can be used in conjunction with connection failover.See "Configuring Connection Failover" for a discussion of connection failover and for information about other connection string attributes that you can set for this feature. ConnectionRetryDelay (CRD) Specifies the number of seconds that the driver waits after the initial unsuccessful connection attempt before retrying a connection to the primary server and, if specified, to the alternate servers.Valid values are integers from 0 to 65535. The initial default is 3 (seconds). When set to 0, there is no delay between retries.NOTE: This attribute has no effect unless the ConnectionRetryCount connection string attribute is set to an integer value greater than 0.This attribute and the ConnectionRetryCount connection string attribute, which specifies the number of times the driver tries to connect after the initial unsuccessful attempt, can be used in conjunction with connection failover.See "Configuring Connection Failover" for a discussion of connection failover and for information about other connection string attributes that you can set for this feature. Database (DB) Specifies the name of the database to which you want to connect. DBLogonID (DBUID) Specifies the data store user name, which may be required depending on the server configuration. DBPassword (DBPWD) Specifies the data store password, which may be required depending on the server configuration. DistinguishedName (DN) Specifies the distinguished name identifying the LDAP entry from which connection information is retrieved. This attribute is required when UseLDAP=1. DriverCompletion (DCOMP) DriverCompletion={0 | 1}. Determines whether to overwrite the DriverCompletion argument setting defined by the application. This attribute must be enabled when connection failover or load balancing is set up.When set to 1, the driver overwrites the DriverCompletion parameter of the SQLDriverConnect call with the value SQL_DRIVER_NOPROMPT.When set to 0 (the default), the behavior of the application is not changed. DSN (DSN) Specifies a string that identifies an ODBC data source configuration. Examples include Accounting or SequeLink to Oracle Data. EnableDescribeParam (EDP) EnableDescribeParam={0 |1}. Specifies a workaround connection attribute for connections to Oracle data stores only.When set to 0 (the initial default), support is turned off for SQLDescribeParam.When set to 1, support is turned on for SQLDescribeParam and will describe all parameters as SQL_CHAR with a precision of 999. Encrypted (ENC) Encrypted={0 | 1}. Enables the use of SSL encryption IF the remote SequeLink Service the client is connecting to is configured for SSL.When set to 0 (the default), the driver does not use SSL encryption for data exchanged with the SequeLink Server.When set to 1, the driver uses SSL encryption. This attribute must be set to 1 when connecting to a SequeLink service enabled for SSL.NOTE: The Encrypted connection attribute is mutually exclusive with the UseLDAP connection attribute. FetchNextOnly (FNO) FetchNextOnly={TRUE | FALSE}. Turns on a workaround for Visual Basic/Remote Data Objects (RDO) that circumvents a problem with FORWARD_ONLY cursors when the driver reports other values than FETCH_NEXT for SQLGetInfo(SQL_FETCH_DIRECTION).For example, if the driver only reports FETCH_NEXT, RDO performs SQLExecDirect, SQLBindCol, and SQLExtendedFetch(NEXT). If the driver supports more than FETCH_NEXT, RDO performs SQLExecDirect, SQLExtendedFetch(NEXT), and SQLGetData. This is only valid when the rowsize is 1, but RDO uses a larger rowsize in this situation.When set to TRUE, the driver will incorrectly report that only SQL_FETCH_NEXT is supported, which satisfies RDO.When set to FALSE (the initial default), the driver will correctly report other values than SQL_FETCH_NEXT. FixCharTrim (FCT) FixCharTrim={0 | 1}. Turns on a workaround for applications that have a problem using SQL_CHAR data padded with spaces. The ODBC driver returns SQL_CHAR data padded with spaces as mandated by the ODBC specification.When set to 0 (the initial default), the workaround is turned off.When set to 1, SQL_CHAR data that is not padded with spaces is returned. GetOutputParams (GOP) Turns on a workaround that allows you to control when output parameters of stored procedures are returned to calling applications. This attribute uses a bitmask with the following options:When set to 1, output parameters are returned after a SQLExecute.When set to 2, output parameters are returned after a SQLFetch is complete.When set to 4, output parameters are returned after SQLMoreResults returns no more rows.When set to 7 (the initial default), output parameters are returned after all of the above.The value for this connection attribute should be set to the cumulative value of all chosen options added together.NOTE: Set GetOutputParams=3 when executing stored procedures with output parameters in RDO (Visual Basic 5 and 6). HLogonID (HUID) Specifies the host user name, which may be required depending on the server configuration. HPassword (HPWD) Specifies the host password, which may be required depending on the server configuration. Host (HST) Specifies the TCP/IP address of the SequeLink Server, specified in dotted format or as a host name.LDAP: If LDAP is enabled, this attribute identifies the TCP/IP address of the LDAP server. This attribute can also be a list of LDAP servers separated by a blank space (for example, ld1.foo.com ld2.foo.com ld3.foo.com). If the first LDAP server in the list does not respond, the ODBC Client will try to connect to the next LDAP server in the list. IANAAppCodePage (IACP) Valid values for this attribute are listed in the SequeLink Developer's Reference. The code page that you specify must be the same as the code page used by your application.The driver on UNIX determines the value of the application's code page by checking for an IANAAppCodePage value in the following order: LimitCursorColumnsize (LCCS) Specifies the Columnsize of a cursor variable. For example, when a default varchar column is created in FileMaker, the database defines it at 1000000 chars. When the application requests a static cursor on a Unicode data source, the driver allocates 3000000 (UTF-8) bytes for this type of column. When multiple varchar columns exist, the application slows down because of disk access in the static cursor. In practice, no applications use 1000000 chars; thus, limiting the column size makes the rowbuffer size smaller and reduces disk access. The ODBC application can specify a parameter in the connection string, for example, LimitCursorColumnsize=1000.When set to 0 (the default), the workaround is not enabled.NOTE: On the SequeLink Server, this workaround can be set using the attribute DataSourceLimitCursorColumnsize. See the SequeLink Administrator's Guide for information about this service attribute. LimitParameterBindSize (LPBS) Specifies the parameter bind size for SQL_CHAR, SQL_VARCHAR, SQL_BINARY, and SQL_VARBINARY values. When exporting a table from Microsoft Access that contains Null data in a memo column, Microsoft Access binds the parameter with a columnSize of 4294967295. The SequeLink Client attempts to allocate a buffer of this size, which typically fails due to lack of memory.To get around this application bug, the SequeLink Server can be configured to limit the parameter bind size for SQL_CHAR, SQL_VARCHAR, SQL_BINARY, and SQL_VARBINARY values to a reasonable value. LoadBalancing (LB) LoadBalancing={0 | 1}. Determines whether the driver uses client load balancing in its attempts to connect to primary and alternate database servers.When set to 1, the driver attempts to connect to the database servers in random order.When set to 0 (the initial default), client load balancing is not used and the driver connects to each database server based on its sequential order (primary server first, then, alternate servers in the order they are specified).NOTE: This attribute has no effect unless alternate servers are defined for the AlternateServers connection string attribute.The LoadBalancing connection string attribute is an optional setting that you can use in conjunction with connection failover.See "Using Client Load Balancing" for more information and for information about other connection string attributes that you can set for this feature. LogonID (UID) Specifies the host or data store user name, which may be required depending on the server configuration. MSAccessWorkaroundCreateParams (MAWCP) MSAccessWorkaroundCreateParams={0 | 1}. Specifies a workaround for a bug in Microsoft Access that generates erroneous queries for Table Export when the value of a CREATE_PARAMS column of SQLGetTypeInfo contains a precision for TIMESTAMP.When set to 1, the workaround is enabled. NewPassword (NPWD) Specifies the new host password to be used. If specified and applicable to the connection, the SequeLink password change mechanism is invoked. When the password has been changed successfully, the following warning is generated:[DataDirect][ODBC SequeLink driver][SequeLink Server] The user password was changed successfullyIf unspecified and the SequeLink Server detects that the host password has expired, you will be prompted for a new host password.For more information about the SequeLink password change mechanism, refer to the SequeLink Administrator's Guide. Password (PWD) Specifies the host or data store password, which may be required depending on the server configuration. Port (PRT) Specifies the TCP/IP port on which the SequeLink Server is listening.LDAP: If LDAP is enabled, this attribute identifies the TCP/IP port on which the LDAP server is listening. If you do not specify a port, the default port for LDAP (389) will be used. ServerDataSource (SDSN) Optionally, specifies a string that identifies the server data source to be used for the connection. If not specified, the configuration of the default server data source will be used for the connection. SessionConnectTimeout (SCTO) Imposes a time limit on: SLKStaticCursorLongColBuffLen (SSCLCBL) Turns on a workaround that allows you to specify the amount of data (in KB) that is buffered for SQL_LONGVARCHAR and SQL_LONGVARBINARY columns with a static cursor.Because the driver caches Unicode characters (UTF-16-LE on Windows, UTF-8 on UNIX), the number of characters that can be cached is smaller for the long-character, Unicode columns.The initial default is 4. TransliterationWorkAroundServer (TWAS) Turns on a workaround for multiple transliteration workarounds. Refer to the SequeLink Administrator's Guide for more information about how SequeLink handles transliteration.When set to 1 or 2, this workaround resolves transliteration issues between Shift-JIS/Windows-31j and eucJP by mapping "look-alike" characters.When set to 0 (the initial default), the workaround is not enabled. UseLDAP (LDAP) UseLDAP={0 | 1}. Determines whether the parameters to establish a connection to the SequeLink Server should be retrieved from LDAP.When set to 0 (the initial default), the SequeLink Client will connect directly to the specified SequeLink Server.When set to 1, the SequeLink Client will retrieve the TCP/IP host, TCP/IP port, and SequeLink server data source (optional) from an LDAP entry identified by a Distinguished Name (DN). Once the connection information is retrieved, the SequeLink Client will connect directly to the specified SequeLink Server. The DistinguishedName (DN) attribute is required.NOTE: The Encrypted connection attribute is mutually exclusive with the UseLDAP connection attribute. WorkArounds (WA) Turns on workarounds that allow you to take full advantage of the ODBC driver with ODBC applications requiring nonstandard or extended behavior.IMPORTANT: Each of these options has potential side effects related to its use. An option should only be used to address the specific problem for which it was designed.When set to 1, the ODBC driver returns 1, allowing Microsoft Access to open tables as read-write. If an ODBC driver reports to Microsoft Access 2.0 that its SQL_CURSOR_COMMIT_BEHAVIOR or SQL_CURSOR_ROLLBACK_BEHAVIOR is 0, Microsoft Access opens tables as read-only.When set to 2, the driver reports that qualifiers are not supported. This option is provided because some applications cannot handle database qualifiers.When set to 4, the driver detects when Visual Basic requires multiple connections to a DBMS and has the multiple ODBC connections share a single physical connection to the DBMS. For DBMSs that support only a single connection, the second attempt fails.When set to 8, the driver returns 1. However, if an ODBC driver cannot detect the number of rows that are affected by an Insert, Update, or Delete statement, it may return -1 in SQLRowCount. Some products cannot handle this.When set to 16, the driver returns no INDEX_QUALIFIER, allowing Microsoft Access to open the table. If an ODBC driver in SQLStatistics reports to Microsoft Access 1.1 that an INDEX_QUALIFIER contains a period, Microsoft Access returns atablename is not a valid nameerror. WorkArounds (cont.) When set to 32, users of flat-file drivers are allowed to abort a long-running query by pressing the ESC key.When set to 64, the result is a column name of Cposition where position is the ordinal position in the result set. For example:SELECT col1, col2+col3 FROM table1produces the column names col1 and C2. SQLColAttributes/SQL_COLUMN_NAME returns an empty string for result columns that are expressions. Use this option for applications that cannot handle empty strings in column names.When set to 256, SQLGetInfo/
SQL_ACTIVE_CONNECTIONS is forced to return as 1.When set to 512, the SQLSpecialColumns function returns a unique index as returned from SQLStatistics to prevent ROWID results.When set to 2048, SQLDriverConnect returns Database= instead of DB= in the returned connection string.When set to 65 536, trailing zeros are stripped from decimal results, which prevents Microsoft Access from generating an error when decimal columns containing trailing zeros are included in the unique index.When set to 131 072, all occurrences of the double quote character ("") are turned into the accent grave character (`). Some applications always quote identifiers with double quotes. Double quoting causes problems for data sources that do not return SQLGetInfo/
SQL_IDENTIFIER_QUOTE_CHAR = ". WorkArounds (cont.) When set to 524 288, the precision and scale settings for SQL_DECIMAL parameters are overridden to precision 40 and scale 20.When set to 8 388 608, SQLGetInfo/SQL_DATABASE_NAME is returned as an empty string when SQLGetInfo/
SQL_MAX_QUALIFIER_NAME_LEN is 0. This option should be used with Inprise/Borland tools, such as Delphi.When set to 536 870 912, SQLBindParameter is allowed to be called after SQLExecute to change the precision of previously bound parameters.When set to 107 3741 824, Microsoft Access assumes that ORDER BY columns do not have to be in the SELECT list. This option provides a workaround for data stores that always use ORDER BY columns. WorkArounds2 (WA2) Turns on workarounds that allow you to take full advantage of the ODBC driver with ODBC applications requiring nonstandard or extended behavior.IMPORTANT: Each of these options has potential side effects related to its use. An option should only be used to address the specific problem for which it was designed.When set to 2, the driver ignores the ColumnSize/DecimalDigits specified by the application and uses the database defaults instead. Some applications incorrectly specify ColumnSize/DecimalDigits when binding timestamp parameters. WorkArounds2 (WA2) (cont.) When set to 4, Microsoft Access uses the most recent native type mapping, as returned by SQLGetTypeInfo, for a specific SQL type. This option reverses the order in which types are returned, so that Microsoft Access will use the most appropriate native type. This option is recommended if you are using Microsoft Access against an Oracle8.x data store.When set to 32, Microsoft Access requires that the characters "DSN=" are returned by SQLDriverConnect in the connection string output parameter.